package com.eshipenet.shipnet.equipmentextbuilder

import play.api.libs.json.JsObject

import scala.util.Try

object EquipmentModel {

//  implicit val format: Format[EquipmentModel] = Json.format[EquipmentModel]
  def apply(raw: JsObject): Try[EquipmentModel] = Try {
    val id = (raw \ "id").as[String]
    EquipmentModel(id, raw)
  }

}

case class EquipmentModel(id: String, raw: JsObject)
